<%@ page import="org.springside.core.Constants"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<fmt:message key="forums_portal_label1" var="forums_portal_label1"/>
<fmt:message key="forums_portal_label2" var="forums_portal_label2"/>
<fmt:message key="forums_portal_label3" var="forums_portal_label3"/>

    
<ff:boxportlet header="${forums_portal_label1}">
 <table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-left:5px">
	<tr>
		<td valign="top">	       
     <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="tbl_left_ico">
        <c:forEach var="forumThread" items="${forumThreads}" begin="0" end="4"> 
        <tr> 
          <td>  
            <a href="#"
            	onClick='mainJump("/modules/forum/forumThread.do?method=show&id=${forumThread.id}&forumId=${forumThread.forums.id}&postwin=true","<%=Constants.USER_THEME_FRAME %>")'
            	title="${forumThread.threadtopic}"> 
            <c:choose>
            <c:when test="${fn:length(forumThread.threadtopic) > param.y}"> 
            <c:if test="${fn:contains(forumThread.threadtopic,'<marquee')&&fn:length(forumThread.threadtopic) > param.y+63}">
            	${fn:substring(forumThread.threadtopic, 53,  param.y+53)}....
            </c:if>
            <c:if test="${fn:contains(forumThread.threadtopic,'<marquee')&&fn:length(forumThread.threadtopic) <= param.y+63}">
            	${fn:substring(forumThread.threadtopic, 53,  fn:length(forumThread.threadtopic)-10)}
            </c:if>
            <c:if test="${!fn:contains(forumThread.threadtopic,'<marquee')}">
            	${fn:substring(forumThread.threadtopic, 0,  param.y)} ....
            </c:if> 
            </c:when> 
            <c:otherwise> 
            ${forumThread.threadtopic}
            </c:otherwise> 
            </c:choose></a> 
            <c:if test="${forumThread.threadcreationdatetime!=null}">
				<font color="#999999">(<fmt:formatDate value="${forumThread.threadcreationdatetime}" pattern="MM-dd HH:mm"/>)</font>
			</c:if>
            </td>
        </tr>
        </c:forEach> 
        <c:if test="${fn:length(forumThreads)<1}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(forumThreads)<2}"> 
         <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(forumThreads)<3}"> 
         <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(forumThreads)<4}"> 
         <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(forumThreads)<5}"> 
         <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
      </table>
      
      <table width="100%" height="17">
        <tr>
          <td>&nbsp;</td>
          <td width="30" class="tbl_more_ico_td">
          <a href="#" class="link_portlet" onClick='mainJump("/modules/forum/forums.do?method=list","<%=Constants.USER_THEME_FRAME %>")'
         	title="<fmt:message key="common_more" />"><fmt:message key="common_more" /></a></td>
        </tr>
     </table>
		</td>
	</tr>
</table>
</ff:boxportlet>
